home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / fixes / fix024 / examples / moon.ray < prev    next >
Text File  |  1994-08-09  |  1KB  |  47 lines

  1. /* fractal mountain 
  2.  * Peter Janssen - dpt. computer science K.U.Leuven, Leuven, Belgium
  3.  * e-mail: philippe@cs.kuleuven.ac.be */
  4.  
  5. eyep 0 100 50
  6. lookp 0 0 20
  7. up 0 0 1
  8. screen 400 400
  9.  
  10. light 0.5 point 0 0 120
  11. light 0.5 point 20 -80 140
  12. light 0.3 point -90 80 120
  13.  
  14. surface moon ambient 0.15 0.15 0.15
  15.              diffuse 0.55 0.55 0.55
  16.              reflect 0.8
  17.  
  18. mountain moon  -100 -100 100 100       /* coordinates of base */ 
  19.         3000             /* random seed */
  20.         0.8             /* fractal dimension = 3-0.8 = 2.2 */
  21.         10            /* precalculation level */ 
  22.         10             /* max. calculation level */
  23.         50.0             /* random displacement scale factor */
  24.         0 0 80             /* matrix of initial height values */
  25.         0 0 80 
  26.         0 0 80
  27.  
  28. #define EXPAND(x)    scale x x x
  29. #define LACUNARITY    2.
  30. #define OCTAVES        6
  31.  
  32. sample 6 
  33.  
  34. /* the planet */
  35. sphere  ambient .06 .05 .04
  36.     diffuse .9 .85 .8
  37.     40    -4 -142 30
  38.     texture fbm     0.        /* offset */
  39.             1.        /* scale */
  40.             0.3        /* h */
  41.             LACUNARITY    /* lambda */
  42.             OCTAVES        /* octaves */
  43.             -.2        /* thresh */
  44.             planet.map     /* mapname */
  45.         EXPAND(50)
  46.  
  47.